home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Graphics / include / bound_3d.h next >
Encoding:
Text File  |  1995-03-25  |  1.6 KB  |  34 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    bound_3d.h
  3. //    Date:                    9/26/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the class definition for a bounding box
  7. //
  8. //------------------------------------------------------------------------------
  9.  
  10. #include "point_3d.h"
  11.  
  12. #ifndef    BOUND_3D
  13. #define    BOUND_3D
  14.  
  15. //------------------------------------------------------------------------------
  16. //    classes
  17. //------------------------------------------------------------------------------
  18. class    bound_3d                                                                                                                                    //    bounding box class
  19. {                                                                                                                                                                //    begin
  20.     private:                                                                                                                                            //    members internal to this class only
  21.     protected:                                                                                                                                        //    members internal to this class hierarchy
  22.                 point_3d    max,                                                                                                                    //    the minimum bound point_3d
  23.                                     min;                                                                                                                    //    the maximum bound point_3d
  24.     public:                                                                                                                                                //    members available externally
  25.                 bound_3d (void);                                                                                                                //    constructor
  26.                 void            operator += (const bound_3d &box);                                                        //    add a bounding box into this one
  27.                 void            operator += (const point_3d &pt);                                                            //    add a point_3d into the bounding box
  28.                 bool            Contains (const point_3d &pt) const;                                                    //    return whether or not a point_3d is inside the bounding box
  29. };                                                                                                                                                            //    end
  30.  
  31. //------------------------------------------------------------------------------
  32.  
  33. #endif    //BOUND_3D
  34.